<?php

namespace app\model;


/**
 * @property integer $id 主键(主键)
 * @property string $created_at 创建时间
 * @property string $updated_at 更新时间
 * @property string $deleted_at 删除时间
 * @property integer $user_id 用户ID
 * @property integer $friend_id 好友ID
 * @property integer $state 状态0发起请求 1已通过 2已拒绝
 * @property integer $remarks 备注
 */
class UserFriend extends Base
{
    /**
     * The table associated with the model.
     *
     * @var string
     */
    protected $table = 'wa_user_friend';

    /**
     * The primary key associated with the table.
     *
     * @var string
     */
    protected $primaryKey = 'id';


    public function user(): \think\model\relation\HasOne
    {
        return $this->hasOne(User::class,'id','user_id');
    }
    
    
    
}
